package com.example.demo.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.example.demo.model.Person;

/**
* @comments JSR-303使用示例
* @author  zg
* @date 2018年8月28日
*/
@RestController
@RequestMapping("chapter1/2/")
public class Chapter1_2Controller {

	@RequestMapping("person")
	public Object person(Person person) {
		String msg = person.validate();
		if(msg != null) {
			return msg;
		}
		return person;
	}
	
}
